﻿
namespace BLPicker.Mocks
{
    using BLPicker;

    public class BusinessLayerFactoryMock : IBusinessLayerFactory<IBusinessLayer<string>>, IBusinessLayerFactory<ISimpleBusinessLayer>
    {
        public IBusinessLayer<string> GetBusinessLayer()
        {
            return new MainBusinessLayerMock();
        }

        public IBusinessLayer<string> GetBusinessLayer(string name)
        {
            return (name == null || name != "SecondOperation")
                ? (IBusinessLayer<string>)new MainBusinessLayerMock()
                : (IBusinessLayer<string>)new AlternativeBusinessLayerMock();
        }

        ISimpleBusinessLayer IBusinessLayerFactory<ISimpleBusinessLayer>.GetBusinessLayer()
        {
            return new SimpleBusinessLayer();
        }

        ISimpleBusinessLayer IBusinessLayerFactory<ISimpleBusinessLayer>.GetBusinessLayer(string name)
        {
            return new SimpleBusinessLayer();
        }
    }
}
